package edu.cmu.aes.project2.wshelper;

import java.util.ArrayList;

public class BikeInfo {
	private String manufacturer;
	private double price;
	private ArrayList<DataElement> frameset;
	private ArrayList<DataElement> wheels;
	private ArrayList<DataElement> drivetrain;
	private String ratingScore;
	private String ratingVote;
	private String year;
	private ArrayList<DataElement> components;
	private String review;
	
	public String getManufacturer() {
		return manufacturer;
	}
	public void setManufacturer(String manufacturer) {
		this.manufacturer = manufacturer;
	}
	public double getPrice() {
		return price;
	}
	public void setPrice(double price) {
		this.price = price;
	}
	public ArrayList<DataElement> getFrameset() {
		return frameset;
	}
	public void setFrameset(ArrayList<DataElement> frameset) {
		this.frameset = frameset;
	}
	public ArrayList<DataElement> getWheels() {
		return wheels;
	}
	public void setWheels(ArrayList<DataElement> wheels) {
		this.wheels = wheels;
	}
	public ArrayList<DataElement> getDrivetrain() {
		return drivetrain;
	}
	public void setDrivetrain(ArrayList<DataElement> drivetrain) {
		this.drivetrain = drivetrain;
	}
	public String getRatingScore() {
		return ratingScore;
	}
	public void setRatingScore(String ratingScore) {
		this.ratingScore = ratingScore;
	}
	public String getRatingVote() {
		return ratingVote;
	}
	public void setRatingVote(String ratingVote) {
		this.ratingVote = ratingVote;
	}
	public String getYear() {
		return year;
	}
	
	public void setYear(String year) {
		this.year = year;
	}
	public ArrayList<DataElement> getComponents() {
		return components;
	}
	public void setComponents(ArrayList<DataElement> components) {
		this.components = components;
	}
	
	public String print(ArrayList<DataElement> ar){
		String temp = "";
		for(int i=0;i<ar.size();i++){
			temp += ((DataElement)ar.get(i)).getName() + "\n";
			temp += ((DataElement)ar.get(i)).getValue() + "\n";
		}
		return temp;
	}
	
	public String getReview() {
		return review;
	}
	public void setReview(String review) {
		this.review = review;
	}
	
	@Override
	public String toString() {
		return "BikeInfo [manufacturer=" + manufacturer + ", price=" + price
				+ ", frameset=" + print(frameset) + ", wheels=" + print(wheels)
				+ ", drivetrain=" + print(drivetrain) + ", ratingScore=" + ratingScore
				+ ", ratingVote=" + ratingVote + ", year=" + year
				+ ", components=" + print(components) + "]";
	}
	

	
	
	
}
